import { lazy } from "react";
import {RouterList} from "../untils/index"

export let mainrouter:RouterList=[{
    path: "/index/classfy",
    element: lazy(() => import("../page/index/Classfy")),
    title:'分类',
    icon:"FriendsO"
},{
    path: "/index/home",
    element: lazy(() => import("../page/index/Home")),
    title:'首页',
    icon:"HomeO"
},{
    path: "/index/my",
    element: lazy(() => import("../page/index/My")),
    title:'我的',
    icon:"Search"
},{
    path: "/index/nav",
    element: lazy(() => import("../page/index/Nav")),
    title:'导航',
    icon:"SettingO"
}]
const routes:RouterList = [
  {
    path: "/index",
    element: lazy(() => import("../page/Index")),
    children:mainrouter
  },
  {
    path: "/deils/:id",
    element: lazy(() => import("../page/Deils")),
  },
  {
    path: "*",
    element: lazy(() => import("../page/Error")),
  },
  {
    path: "/",
    to:"/index/home"
  },
  {
    path: "/login",
    element: lazy(() => import("../page/Login")),
  },
];
export default routes